<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .rect1 {
      width: 108px;
      height: 36px;
      background: #2c4266;
      border: 2px solid #45d2fb;
      box-shadow: 0px 2px 6px 0px rgba(17,37,70,0.6), 0px 0px 10px 0px #45d2fb inset; 
      transform: skewX(-20deg);
      color: #fff;
      text-align: center;
      line-height: 35px;
      display: inline-block;
    }
    .rect1 p {
      margin: 0;
      transform: skewX(20deg);
      
      /* display: inline-block; */
      /* vertical-align: middle; */
    }
    /* .rect1::before {
      content: '';
      width: 0;
      height: 100%;
      display: inline-block;
      vertical-align: middle;
    } */
    .rect2 {
      width: 108px;
      height: 36px;
      background: #244675;
      border: 1px solid;
      border-image: linear-gradient(180deg, #26759a, #6196da) 1 1;
      transform: skewX(-20deg);
      color: #fff;
      text-align: center;
      display: inline-block;
      line-height: 35px;
    }
    .rect2 p {
      margin: 0;
      transform: skewX(20deg);
    }
  </style>
</head>
<body>
  <div class="rect1">
    <p>文字内容</p>
  </div>
  <div class="rect2">
    <p>文字内容</p>
  </div>
</body>
</html>